<h1>『 {{ $title }} 』</h1>
<form action="?controller=admin_usergroup&action=saveband" method="POST">
<div id="thisuginfo">
	<h1>
	<select id="select_usergroup" name="user_group_id">
	<option>请选择用户组</option>
	{{ foreach from=$ugList item=usergroup }}
		<option value="{{ $usergroup.user_group_id }}" >{{ $usergroup.levelstr }} {{ $usergroup.group_name }}</option>
	{{ /foreach }}
	</select>
	通过继承获得的权限
	&nbsp;<input id="savebutton" type="submit" value="保存该组的权限" />
	</h1>
	<table>
		<tr>
			<td><h3 class="green">许可的角色</h3><ul class="allow_roles"></ul></td>
			<td><h3 class="red">拒绝的角色</h3><ul class="deny_roles"></ul></td>
		</tr>
		<tr>
			<td><h3 class="green">许可的权限</h3><ul class="allow_permissions"></ul></td>
			<td><h3 class="red">拒绝的权限</h3><ul class="deny_permissions"></ul></td>
		</tr>
	</table>
	
	
	
	
	
</div>

<div id="allRoles">
<h1>全部角色列表</h1>

<ul>
{{ foreach from=$rolesList item=role }}
	
	<li role_id="{{ $role.role_id }}">
		<input class="ckbox" name="roles[{{ $role.role_id }}]" type="checkbox" role_id="{{ $role.role_id }}" />
		<select name="is_include[{{ $role.role_id }}]">
			<option value="1">允许</option>
			<option value="0">拒绝</option>
		</select>
		<span role_id="{{ $role.role_id }}">
		&nbsp;&nbsp;{{ $role.description }}&nbsp;({{ $role.rolename }})
		</span>
	</li>
	
{{ /foreach }}
</ul>
</div>

<div id="allPermissions">
<h1>全部权限列表</h1>
{{ foreach from=$permissionsList item=onePerGroup }}
	
	<h1>{{ $onePerGroup.permission_group_name }} ({{ $onePerGroup.aliasname }})</h1>
	
	<ul>
	{{ foreach from=$onePerGroup.permissions item=permission }}
		
		<li permission_id="{{ $permission.permission_id }}">
			<input class="ckbox" name="permissions[{{ $permission.permission_id }}]" type="checkbox" permission_id="{{ $permission.permission_id }}" group_id="{{ $onePerGroup.permission_group_id }}" />
			<select name="is_allow[{{ $permission.permission_id }}]">
				<option value="1">允许</option>
				<option value="0">拒绝</option>
			</select>
			<span permission_id="{{ $permission.permission_id }}">
			&nbsp;&nbsp;{{ $permission.pername }} ({{ $onePerGroup.aliasname }})
			</span>
		</li>
		
	{{ /foreach }}
	</ul>

{{ /foreach }}
</div>
</form>